Security Issues Labs
1. SELinux
On the
server1.example.comsystem, ensure that the system is configured with SELinux set to enforcing at boot time, and that it is currently enabled.Configure
/etc/httpd/conf.d/my.confcreated in a previous lab to point to/var/mywww.Restart
httpd.Create
index.htmlin/var/mywww.If SELinux is enabled, accessing
index.htmlin this directory viacurlshould fail.Fix SELinux issues with the new directory and make it permanent.
2. IPA Authentication
As
rootonserver1download and uncompress the lab scripts tarball in/root:[root@server1 ~]# wget http://www.opentlc.com/download/RTlabscripts.tar.gz [root@server1 ~]# tar -xf RTlabscripts.tar.gz
On the
server1.example.comsystem, useyum(notrpm) to install the/root/configipasrv-1.0-1.noarch.rpmpackage.[root@server1 ~]# yum -y install /root/configipasrv-1.0-1.noarch.rpm
Run
/root/installIPA.shto configure the VM as an IPA server.[root@server1 ~]# /root/installIPA.sh [root@server1 ~]# systemctl stop firewalld
This process will take several minutes as the script configures an entire IPA server environment.
Make sure the following ports are open on server1:
TCP Ports:
80, 443: HTTP/HTTPS
389, 636: LDAP/LDAPS
88, 464: kerberos
53: bind
UDP Ports:
88, 464: kerberos
53: bind
Configure
desktop1.example.comto be an IPA client.[root@desktop1 ~]# echo "192.168.0.101 server.example.com" >> /etc/hosts [root@desktop1 ~]# yum -y install ipa-client [root@desktop1 ~]# systemctl start ntpdate [root@desktop1 ~]# systemctl start ntpd [root@desktop1 ~]# systemctl enable ntpdate [root@desktop1 ~]# systemctl enable ntpd [root@desktop1 ~]# echo "DNS1=192.168.0.101" >> /etc/sysconfig/network-scripts/ifcfg-eth0 [root@desktop1 ~]# sed -i "s/PEERDNS=yes/PEERDNS=no/" /etc/sysconfig/network-scripts/ifcfg-eth0 [root@desktop1 ~]# systemctl restart network [root@desktop1 ~]# ipa-client-install -N -U -p admin -w r3dh@t13 --hostname client.example.com --domain EXAMPLE.COM --server server.example.com --force
3. Authentication
Create a local user called
newguyand set the password tonewguy123.Test using
sshto connect todesktop1.example.comas local usernewguywith the passwordnewguy123.Test using
sshto connect todesktop1.example.comas remote userremote1with the passwordr3dh@t13.Install
/root/authlab1-1.0-1.noarch.rpmondesktop1.example.com.Use
sshto attempt to connect todesktop1.example.comas local usernewguywith the passwordnewguy123.Debug why this fails, without changing the password.
Use
sshto attempt to connect todesktop1.example.comas remote userremote1with the passwordr3dh@t13.See if the user is visible on
desktop1.example.com.[root@desktop1 ~]# getent passwd remote1
Debug why this fails.